Much of a computer system's functionality and usefulness to a user is derived from the functionality of the peripheral devices. For example, the speed and responsiveness of the graphics adapter is a major factor in a computer system's usefulness as an entertainment device. Or, for example, the speed with which video files can be retrieved from a hard drive and played by the graphics adapter determines the computer system's usefulness as a training aid. Hence, the rate at which data can be transferred among the various peripheral devices often determines whether the computer system is suited for a particular purpose. To this end, the electronics industry has, over time, developed several different high-performance bus architectures. Recently, the Accelerated Graphics Port (AGP), which is an enhancement of the PCI bus architecture, has become widely supported and widely used as the standard interface between graphics adapters and host computers.
The AGP provides significantly improved performance over conventional graphics adapters which utilize local memory, known as local frame buffers (LFBs), as their primary graphics memory. In these conventional graphics adapters, image data are generally stored in system memory. However, image data are not rendered directly from system memory. Rather, image data are first copied to the LFBs and then rendered from the LFBs. Naturally, this method of storing and rendering image data is highly inefficient. For instance, extra instructions have to be executed to copy the image data to the LFBs, and extra memory has to be used to store duplicate copies of the same image data. Complexity of the image data is also severely restricted as the LFBs are usually quite small compared to the system memory. In the fiercely competitive PC-peripherals market, the inefficient use of memory and the performance overhead associated with copying image data to the LFBs significantly undercut the demand of those graphics adapters.
In marked contrast to conventional graphics adapters, AGP-compliant graphics adapters can use both the LFBs and the system memory as primary graphics memory. From the graphics adapter's perspective, both LFBs and system memory are considered logically equivalent, and image data may be allocated in either memory. Particularly, in AGP-compliant graphics adapters, image data stored in system memory are not copied into the LFBs prior to rendering, but are rendered "in place." That is, image data are read and rendered directly from system memory. One major advantage of this method of direct rendering (also known as Direct Memory Execute, or DME) over conventional designs is that the amount of usable primary graphics memory is significantly increased. Another advantage is improved performance as it is no longer necessary to transfer image data to the LFBs prior to rendering.
This direct rendering feature of AGP, however, may not be compatible with most existing operating systems, which treat system memory as cacheable. In these operating systems, instructions and data frequently accessed are copied to and temporarily stored at a high-speed cache memory such that additional accesses to the same instructions and data can be performed very quickly. Ordinarily, caching operations would enhance system performance. However, caching may actually hinder the performance of AGP graphics adapters because cache memory may sometimes be "incoherent" with system memory. That is, the CPU may have modified certain data in the cache memory without updating the system memory. As a results, the copy in the cache may be different from the master copy in the system memory. In other words, the data stored in the system memory have become "stale." Thus, by addressing cacheable system memory directly, the graphics adapter may erroneously render "stale" image data in the system memory.
One solution to the incoherency problem is to "snoop" the cache memory before accessing the system memory. Snooping is a technique used by cache memory controllers to detect an access to the main memory that might cause a cache consistency problem. For instance, before accessing a particular piece of data within the system memory, the cache memory is checked to see whether it contains a more recent copy of that particular piece of data. If the cache memory has a more recent copy, it is written to the system memory. Snooping effectively eliminates the cache coherency problem. However, snooping also introduces significant overhead to the rendering process and substantially hinders the performance of the AGP graphics adapter.
Another solution to the cache coherency problem is to modify the existing operating systems to set aside a particular portion of the system memory as non-cacheable. However, that solution is not feasible as the cost of modifying an existing operating system is prohibitive. More importantly, any modification to the existing operating systems may cause compatibility problems and may introduce unforeseeable software glitches.
Therefore, what is needed is a method of and system for allowing cacheable system memory to be accessed in a non-cacheable manner such that snooping may be avoided. The present invention offers a unique and novel solution whereby extensive modification to the operating systems is unnecessary. The solution offered by the present invention is also relatively inexpensive and may easily be implemented in many of today's computer systems.